package com.mocha.util;

import org.apache.commons.lang3.RandomStringUtils;

import java.util.UUID;

public class RandomUtil {

    public static String uuid() {
        return UUID.randomUUID().toString();
    }

    public static String uuid32() {
        return uuid().replaceAll("-", "");
    }
    public static String randomString(int count, boolean letters, boolean numbers) {
        return RandomStringUtils.random(count, letters, numbers);
    }
    public static String randomString(int count) {
        return randomString(count, true, true);
    }

    public static void main(String[] args) {
        System.out.println(uuid32());
        System.out.println(randomString(32, true, false));
    }

}
